#include<stdio.h>
int main()
{
	int day=0;
	scanf("%d",&day);
	if(day<=5) 
		printf("%d",day+2);
	else printf("%d",day+2-7);
	return 0;
}
